package com.study.fall_handler;

import com.alibaba.fastjson.JSON;
import com.study.vo.JwtToken;
import com.study.vo.UsernameAndPassword;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class StudyFallbackHandler {

    //必须时静态的
    public static JwtToken getTokenFromAuthorityServiceFallback(
        UsernameAndPassword usernameAndPassword
    ){
        log.error("get token from authority service fallback: [{}]",
                JSON.toJSONString(usernameAndPassword));

        return new JwtToken("study-fallback");
    }
}
